package com.chixing.service.impl;

import com.chixing.mapper.HotelMapper;
import com.chixing.pojo.Hotel;
import com.chixing.service.HouseService;
import com.chixing.util.ServerResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HouseServiceImpl implements HouseService {
    @Autowired
    private HotelMapper hotelMapper;
    @Override
    public ServerResponse getByName(Integer id) {
        Hotel hotel = hotelMapper.selectByPrimaryKey(id);
        if (hotel !=null)
            return ServerResponse.getSuccess(hotel);
        return ServerResponse.getFail(null);
    }
}
